package com.ruoyi.customer.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.customer.domain.OrderContract;
import com.ruoyi.customer.mapper.OrderContractMapper;
import com.ruoyi.customer.service.IOrderContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author dxw
 * @date 2022-04-20
 */
@Service
public class OrderContractServiceImpl implements IOrderContractService
{
    @Autowired
    private OrderContractMapper orderContractMapper;

    /**
     * 查询啊
     *
     * @param orderNumber 啊主键
     * @return 啊
     */
    @Override
    public OrderContract selectOrderContractByOrderId(Long orderNumber)
    {
        return orderContractMapper.selectOrderContractByOrderId(orderNumber);
    }

    /**
     * 查询啊列表
     *
     * @param orderContract 啊
     * @return 啊
     */
    @Override
    public List<OrderContract> selectOrderContractList(OrderContract orderContract)
    {
        return orderContractMapper.selectOrderContractList(orderContract);
    }

    /**
     * 新增啊
     *
     * @param orderContract 啊
     * @return 结果
     */
    @Override
    public int insertOrderContract(OrderContract orderContract)
    {
        orderContract.setCreateTime(DateUtils.getNowDate());
        return orderContractMapper.insertOrderContract(orderContract);
    }

    /**
     * 修改啊
     *
     * @param orderContract 啊
     * @return 结果
     */
    @Override
    public int updateOrderContract(OrderContract orderContract)
    {
        orderContract.setUpdateTime(DateUtils.getNowDate());
        return orderContractMapper.updateOrderContract(orderContract);
    }

    /**
     * 批量删除啊
     *
     * @param orderNumbers 需要删除的啊主键
     * @return 结果
     */
    @Override
    public int deleteOrderContractByOrderIds(Long[] orderNumbers)
    {
        return orderContractMapper.deleteOrderContractByOrderIds(orderNumbers);
    }

    /**
     * 删除啊信息
     *
     * @param orderNumber 啊主键
     * @return 结果
     */
    @Override
    public int deleteOrderContractByOrderId(Long orderNumber)
    {
        return orderContractMapper.deleteOrderContractByOrderId(orderNumber);
    }
}
